<template>
  <div class="page-miH page-bgBack p24">
    <div style="display:flex;padding-top:120px;flex-direction:column;align-items:center;justify-content:center;">
      <img style="width:280px;height:235px;" :src="zhifubaoAuthorization" alt="" />
      <div style="margin-top:40px;font-size:18px;font-weight:500;color: #3C3D43;">恭喜你，支付宝账号授权成功</div>
      <div style="margin-top:16px;font-size:14px;font-weight:400;color:#A6A8B4;">可以用支付宝发放薪资啦！</div>
      <!-- <a-button type="primary" style="margin-top:24px" @click="paySalary">薪资发放</a-button> -->
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      zhifubaoAuthorization: require("@/assets/img/zhifubaoAuthorization.png")
    };
  },
  mounted() {
    this.paySalary();
  },
  methods: {
    paySalary() {
      const pid = localStorage.getItem("zfbPid");
      const code = this.$route.query.app_auth_code;
      this.$request({
        url: `/hr/api/v1/transferAccountsBatches/updateZfbAppAuthToken/${code}/${pid}`
      })
        .then(res => {
          this.$message.success("账户绑定成功！");
        })
        .catch(err => {
          console.log(err);
          this.$message.error("账户绑定失败！");
        });
    }
  }
};
</script>

<style lang="scss" scoped></style>
